package lib.control;

import java.util.ArrayList;
import java.util.List;

import lib.exception.VideoControlException;
import lib.model.VideoFile;
import settings.model.MappingBierdopjeScene;

public abstract class VideoFileControl {

    protected VideoFile videoFile;
    protected SubtitleControl sc;

    public VideoFileControl(VideoFile videoFile) {
        this.sc = new SubtitleControl(videoFile.getVideoType());
        this.videoFile = videoFile;
    }

    abstract VideoFile process(List<MappingBierdopjeScene> dict) throws VideoControlException;

    abstract VideoFile processWithSubtitles(List<MappingBierdopjeScene> dict, String languageCode, boolean exactMatch) throws VideoControlException;

    public VideoFile process() throws VideoControlException {
        return this.process(new ArrayList<MappingBierdopjeScene>());
    }

    public VideoFile processWithSubtitles(String languageCode, boolean exactMatch) throws VideoControlException {
        return this.processWithSubtitles(new ArrayList<MappingBierdopjeScene>(), languageCode, exactMatch);
    }
    
    public void setVideoFile(VideoFile videoFile) {
        this.videoFile = videoFile;
    }
    
    public VideoFile getVideoFile() {
        return videoFile;
    }
}
